package com.demo.study.behavior.d02_command.controller.light;

import com.demo.study.behavior.d02_command.controller.Receiver;

/**
 * 操作灯的执行者（实际干活的类）
 *
 * @author Baymax
 * @since 2022/3/25
 */
public class LightReceiver implements Receiver {
    private String lightName;

    public LightReceiver(String lightName) {
        this.lightName = lightName;
    }

    @Override
    public void on() {
        System.out.println(lightName + "牌子的灯打开了");
    }

    @Override
    public void off() {
        System.out.println(lightName + "牌子的灯关闭了");
    }
}
